/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.nanosn.web.framework.rest;

import java.io.Writer;
import java.util.List;

/**
 * A representation interface for the REST data handling
 * @author selkhateeb
 */
public interface IRest
{   
    void WriteResource(List<String> uri);

    void setWriter(Writer out);
    
    /**
     * Performs a database select.
     * gets an item from the database by primaryKey
     * @param primaryKey the primary key of the row.
     */
    void Select(String primaryKey);

    /**
     * Performs a database insert.
     * Inserts an item into the database.
     * @param JSONitem the item to be inserted
     */
    void Insert(String JSONitem);

    /**
     * Performs a database update.
     * Updates the database row.
     * @param JSONitem the item to be inserted
     */
    void Update(String primaryKey, String JSONitem);

    /**
     * Performs a database Delete statement.
     * Deletes a row from the database by its primary key.
     * @param primaryKey the primary key of the row.
     */
    void Delete(String primaryKey);
}
